package com.rchik.divermate;

import android.database.Cursor;
import android.graphics.drawable.LevelListDrawable;
import android.view.View;
import android.widget.ImageView;
import android.widget.SimpleCursorAdapter.ViewBinder;

public class DiveTableRowBinder implements ViewBinder {
	
	@Override
	public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
		
		((LevelListDrawable)((ImageView)view).getDrawable()).setLevel(cursor.getPosition());
		
		return true;
	}

}
